Set Theory
A set is a collection of distinct objects. A set simply specifies the contents, the order is not important. is the same as .
A set doesn't have to contain numbers, you could, for example, have a set of the base colors you are not limited in this regard, Important is that they are distinct.
If we have the set . To indicate that an object is an element/member of the set you write . To indicate that an object is not an element of a set you write .
Sets are characterized by their elements. Thus, two sets are only equal if they have the same elements. If then . However and therefore .
There is only one set with no elements at all, the empty set, and is represented by the symbol . You may also see being used.
Notations
There are multiple ways to define a set.
Roster Notation
The roster or also called enumeration notation defines a set by listing its elements between curly brackets separated by commas.
For example
Set-Builder Notation
This is probably the hardest notation to understand. The set-builder notation specifies a set as a selection from a larger set, determined by a condition on those elements.
For example The vertical bar, "|" means "such that". So the description can be read as "F is the set of all numbers n such that n is an integer in the range from 0 to 5 inclusive.
Semantic Definition
Sets can also be described using words and rules.
Let be the first 3 positive integers that are odd. So Let be the set of colors of the French flag. So
Sets of Numbers
A good visualization for the set of numbers.
Natural Numbers
some authors do not include 0 in the set of natural numbers. These authors then use the following notation to include 0 . I prefer to include 0 and in the special cases where I do not want it to be included I can use set subtraction/difference .
Integers
Multiple variations and combinations are also possible:
- combinations are also possible.
Rational Numbers
including proof of why sqrt(2) is not a rational number but irrational
Real Numbers
Complex Numbers
The set of complex numbers is denoted with . You can see what complex numbers are and how they are used on this page or also just look at a cheat sheet to refresh your knowledge (will however be in german).
Sub and Superset
is a subset of a set if all elements of are also elements of . is then a so called superset of .
In the above case It is possible for and to be equal. if they are unequal but a subset, then is a so called proper subset of .
The notations for the relations mentioned above can be very different see here. I will however be using the following notations:
- For is a subset of :
- For is a superset of :
- For is a proper subset of :
- For is a proper superset of :
It's a big help if you imagine sets as circles by doing so you can easily visualize things like the following:
Notice that , for any set .
Ordered Pair
An ordered pair is a pair of objects. The order in which the objects appear in the pair is significant: the ordered pair is different from the ordered pair unless. In contrast, the unordered pair equals the unordered pair .
Basic Set Operations
There are several fundamental operations for constructing new sets from given sets.
Union
Two sets can be joined together, this results in the so called union of and . This is written as . The union is the set containing all elements that are in or or both.
Intersection
A new set can also be constructed by determining which elements two sets have "in common", this results in the so called intersection of and . This is written as . The intersection is the set of all things that are elements of both and . If , then and are called disjoint.
Complements
The so called absolute complement of (or simply the complement of ) is the set of elements not in . In other words, let be a set that contains all the elements under study. If there is no need to mention , either because it has been previously specified, or it is obvious (for example all positive numbers). Then the absolute complement of is the difference (Or relative complement) of in . This can be written as .
Difference
If and are sets, then the relative complement (or short difference) of and , is the set of elements in without the elements of . This can be written as .
Symmetric Difference
The symmetric difference of two sets (also known as the disjunctive union), is the set of elements which are in either of the sets, but not in both sets (their intersection). This can be written as or which can however cause confussion with other subjects. The symmetric difference can be defined as or as .
Cartesian Product
The Cartesian product of two sets and , denoted by , is the set of all ordered pairs where is an element of and is an element of . So in short a set of all of the possible combinations.
Cardinality
The cardinality of a set is the number of elements/members of . This can be written as .
If then
Repeated elementes in roster notation are not counted, so then
Power Set
The power set or also called super set of a set is the set containing all subsets of . The empty set and itself are also elements of the power set of , because these are also both subsets of .
The power set of the set is commonly written as or
Given :
Cardinality of a Power Set
The amount of elements in a power set is pretty easy to calculate. If as in the example above then which can simplified to , this is why I prefer to use the notation as the other notation can quickly cause confusion.
Partitions
A partition of a set is a set of non-empty subsets of such that every element is in exactly one of these subsets.
The set is only a partition of if and only if all of the following conditions hold:
- P does not contain the empty set, so .
- The union of all the sets in is equal to .
- The intersection of any two distinct sets in is the empty set,
The set has 5 possible partitions:
The following are not partitions of {1,2,3}:
- is not a partition because one of its elements is the empty set.
- is not a partition because the element 2 is contained in more than one block.
- is not a partition of because none of its blocks contains the element 3.